<template>
<!-- 单个推荐列表头部 -->
  <div v-if="list" class="header">
      <van-image
          width="30"
          height="30"
          lazy-load
          :src="list.p || list.user_photo"
          :round="true"
      >
        <template v-slot:loading>
          <img src="../assets/images/head.png" alt="">
        </template>
      </van-image>
      <!-- <img :src="list.p" class="userImg"> -->
      <div class="listBox">
        <div class="name">
          <div class="userName">{{list.n || list.nickname}}</div>
          <div class="lv" v-if="list.lv || list.lvl">LV.{{list.lv || list.lvl}}</div>
        </div>
        <div v-if="list.followers_count_text" class="fensi">
          <span>{{list.followers_count_text}}</span>
          <span>{{list.recipes_count_text}}</span>
        </div>
      </div>
  </div>
</template>

<script>
export default {
  props:["list"],
}
</script>

<style lang="less" scoped>
.header{
height: 60px;
padding: 0 15px;
display: flex;
align-items: center;
  .listBox{
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 10px;
    .name{
      display: flex;
      .userName{
        // line-height:60px;
        margin-right: 10px;
      }
      .lv{
        // line-height:60px;
        color: #cba43b;
        font-style: italic;
        font-size: 12px;
        line-height: 22px;
      }
    }
    .fensi{
      font-size: 13px;
      color: #999999;
      span:first-child::after{
        content: '-';
        display: inline-block;
        margin: 0 5px;
      }
    }

  }
}
</style>